//
//  ParametersVCF.m
//  CocoaSynth
//
//  Created by Thomas Dupont on 22/02/10.
//  Copyright 2010 Apple Inc. All rights reserved.
//

#import "ParametersVCF.h"

#import "ModuleVCFViewController.h"
#import "ModuleVCFProtocol.h"
#import "SynthKit.h"

@implementation ParametersVCF

@synthesize module;
@synthesize frequencySlider;
@synthesize frequencyText;

- (void)awakeFromNib
{
	[frequencySlider setFloatValue:0];
	[self frequencyChange:nil];
}

- (IBAction)frequencyChange:(id)sender
{
	[frequencyText setTitleWithMnemonic:[NSString stringWithFormat:@"%.1f", [frequencySlider floatValue]]];
	[self refreshResult];
}

- (void)refreshResult
{
	[(id<ModuleVCFProtocol>)[module model] setInputFrequencyModificator:[frequencySlider floatValue]];
}

@end
